//
//  CJSSectionView.m
//  GoTraveling
//
//  Created by 陈金山 on 15/12/25.
//  Copyright © 2015年 开发华佗. All rights reserved.
//

#import "CJSSectionView.h"

@interface CJSSectionView ()

@property (nonatomic, retain) UIImageView *navImage;

@property (nonatomic, retain) UILabel *timeLabel;

@end

@implementation CJSSectionView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void) createSubViews {
    
    self.navImage = [[UIImageView alloc] initWithFrame:CGRectMake(25 * ADAPT_WIDTH, 0, SCREEN_WIDTH - 20, 40 * SCREEN_HEIGHT / 667)];
    [self addSubview:self.navImage];
    
    //时间
    self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(40 * ADAPT_WIDTH, 0, SCREEN_WIDTH - 40, 20)];
    self.timeLabel.textColor = [UIColor colorWithRed:0.66 green:0.56 blue:0.35 alpha:1];
    self.timeLabel.font = [UIFont systemFontOfSize:16 weight:0.1];
    [self.navImage addSubview:self.timeLabel];
}

- (void)setDate:(NSString *)date {
    
    _date = date;
    
    NSLog(@"date ===== %@",self.date);
    
    self.navImage.image = [UIImage imageNamed:@"journey_table_header"];
    self.timeLabel.text = self.date;
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
